package com.cytech.cloudclinic.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.cytech.cloudclinic.R;
import com.cytech.cloudclinic.bean.Drug;

import java.util.List;

public class PrescriptionTemplateDrugAdapter extends BaseQuickAdapter<Drug,BaseViewHolder> {

    public PrescriptionTemplateDrugAdapter( List<Drug> data) {
        super(R.layout.item_prescription_template_drug, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Drug s) {
        baseViewHolder.setText(R.id.tv_prescription_child_drug_name,s.drug_name);

        baseViewHolder.setText(R.id.tv_prescription_child_drug_weight,s.count_unit +s.cont_unit_text);
        baseViewHolder.setText(R.id.tv_prescription_child_drug_use,s.usage_mode_text);
        baseViewHolder.setText(R.id.tv_prescription_child_drug_frequency,s.frequency_text+"/每次"+s.count_unit +s.cont_unit_text);
    }
}
